var http = require("http");
var url = require("url");
function start(route, handle) {
	function onReady(request, response) {
		var pathname = url.parse(request.url).pathname;
		console.log("Request for " + pathname +" recived.");
		
		route(handle,pathname,response,request);
	}
	http.createServer(onReady).listen(8888);
	console.log("server start...");
}

exports.start = start;
